Third-party Web Service Tutorial

Preliminary

MRI Dreamscape provides a "get token" service that returns a security token to control access to its workflow web services. This example will use the get token service as if it was a third -party web service that you want to integrate.

To obtain a token, an HTTP GET (or POST) request is made with a username and password like this:

http://workflowrest.<Domain>/ my company name/workflow/gettoken?userName=<username>&password=<password>

for example:

http://workflowrest.fsidev.co.uk/chowies/workflow/gettoken?username=MrChow&password=Arrdvark

You can discover the get token URL for your own system by selecting any service from the list on the Workflow Web Services page, and clicking the Rest Detail button; see Workflow Rest Endpoints.

Configuring the web service

The screen shot below shows the web service configuration.

For basic configuration details see Third Party Web Services: REST

Testing with a web application

To test the service, make a page in a web application with a button and a text box control.

The screen shot below shows the Properties > Behaviour configuration for the button. When clicked, the web service is executed and returns the token and related user information to the text box control for display.

Note | The input parameter fields in the button properties shown below are not configured because the values are being provided by the web service configuration shown above. If we had not provided values in the web service, the values could be set in the Static Value fields, or supplied by the user using two additional two text box controls specified in the Input Control fields.

Token details returned

Example displayed in a text box in the application: